package com.jiantong.version.impl.dao;

import com.jiantong.version.model.DictionaryVersion;
import io.terminus.common.mysql.dao.MyBatisDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by mz on 25/8/17.
 *
 */
@Repository
public class DictionaryVersionDao extends MyBatisDao<DictionaryVersion>{

    /**
     * 查询所有
     * @return List<DictionaryVersion>
     */
    public List<DictionaryVersion> findAll(){
        return getSqlSession().selectList(sqlId("findAll"));
    }

    /**
     * 查询app端的码名
     * @return List<DictionaryVersion>
     */
    public DictionaryVersion findForApp(){
        return getSqlSession().selectOne(sqlId("findAppCodeNameVersion"));
    }
}
